import request from '@/utils/request';
import {OrganizationQueryDTO} from "@/types/organization";
import {ProfileDTO} from "@/types/common";

export async function queryList(params:OrganizationQueryDTO): Promise<any> {
  return request('/organization/query_list',{
    method: 'POST',
    data: params,
  });
}

export async function create(params:ProfileDTO): Promise<any> {
  return request('/organization/create',{
    method: 'POST',
    data: params,
  });
}

export async function modify(params:ProfileDTO): Promise<any> {
  return request('/organization/modify',{
    method: 'PUT',
    data: params,
  });
}

export async function _delete(params:{id:number}): Promise<any> {
  return request('/organization/delete',{
    method: 'DELETE',
    data: params
  });
}

export default {
  queryList,
  create,
  modify,
  _delete,
}
